package server.fsm;

public abstract class GenericServerState {

	private ServerContext serverContext;

	public ServerContext getServerContext() {
		return serverContext;
	}

	public void setServerContext(ServerContext serverContext) {
		this.serverContext = serverContext;
	}

	public String login( String username, String password ) {
		return "<error type='UNEXPECTED_CMD'>Server was not expecting a LOGIN command in it's current state.</error>";
	}

	public String logout() {
		return "<error type='UNEXPECTED_CMD'>Server was not expecting a LOGOUT command in it's current state.</error>";
	}

	public String listFiles() {
		return "<error type='UNEXPECTED_CMD'>Server was not expecting a LIST_FILES command in it's current state.</error>";
	}

	public String downloadFile( String file, Long size, Long lastModified ) {
		return "<error type='UNEXPECTED_CMD'>Server was not expecting a UPLOAD command in it's current state.</error>";
	}

	public String uploadFile( String file, Long fileSizeBytes, int chunkSize ) {
		System.out.println("state = " + this.getClass().getName() );
		return "<error type='UNEXPECTED_CMD'>Server was not expecting a DOWNLOAD command in it's current state.</error>";
	}

	public String data( String base64EncodedDataString ) {
		return "<error type='UNEXPECTED_CMD'>Server was not expecting a DATA command in it's current state.</error>";
	}

	public String waiting( String file, Long size ) {
		return "<error type='UNEXPECTED_CMD'>Server was not expecting a WAITING command in it's current state.</error>";
	}

	public String receive( Boolean didFail ) {
		return "<error type='UNEXPECTED_CMD'>Server was not expecting a RECEIVE command in it's current state.</error>";
	}

	public String delete( String file ) {
		return "<error type='UNEXPECTED_CMD'>Server was not expecting a DELETE command in it's current state.</error>";
	}

}
